gtkcssgadget: Use private non-checking versions of gtk_widget calls
authorAlexander Larsson <alexl@redhat.com>
Wed, 11 Jan 2017 11:04:21 +0000 (12:04 +0100)
committerAlexander Larsson <alexl@redhat.com>
Wed, 11 Jan 2017 11:05:44 +0000 (12:05 +0100)
This avoids a lot of checking overhead.

gtk/gtkcssgadget.c

index f1416a3ea52624f1831bc1e6977e738d430c49cc..3fb2f0af370969987299926f9416b7bb0c3b9982 100644 (file)
@@ -30,6 +30,7 @@
 #include "gtkcsswidgetnodeprivate.h"
 #include "gtkrenderbackgroundprivate.h"
 #include "gtkrenderborderprivate.h"
+#include "gtkwidgetprivate.h"
 #include "gtkdebug.h"
 #include "gtkprivate.h"
 
@@ -506,10 +507,10 @@ shift_allocation (GtkCssGadget  *gadget,
 {
   GtkCssGadgetPrivate *priv = gtk_css_gadget_get_instance_private (gadget);
 
-  if (priv->owner && !gtk_widget_get_has_window (priv->owner))
+  if (priv->owner && !_gtk_widget_get_has_window (priv->owner))
     {
       GtkAllocation widget_alloc;
-      gtk_widget_get_allocation (priv->owner, &widget_alloc);
+      _gtk_widget_get_allocation (priv->owner, &widget_alloc);
       allocation->x -= widget_alloc.x;
       allocation->y -= widget_alloc.y;
     }